//
//  NSDateComponents+XMNYR.m
//  XMKit
//
//  Created by chenming on 2017/12/21.
//  Copyright © 2017年 ChenXiaoMing. All rights reserved.
//

#import "NSDateComponents+XMNYR.h"

@implementation NSDateComponents (XMNYR)

+ (NSDateComponents *)xm_dateComponentsFromDate:(NSDate *)date {
    NSDateComponents *components = [[NSCalendar currentCalendar] components:NSCalendarUnitYear| NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitWeekOfYear |  NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond | NSCalendarUnitWeekday | NSCalendarUnitWeekdayOrdinal fromDate:date];
    return components;
    
}

@end
